#include<iostream>
#include"GameBoard.h"
using namespace std;

GameBoard::GameBoard()
{}
GameBoard::GameBoard(int a_start)
{	
	for(int row =0 ; row < HEIGHT; ++row)
	{
		for( int col = 0; col < WIDTH; ++col)
		{
			m_Board[row][col].m_Type = EMPTY;
			m_Board[row][col].m_x = row;
			m_Board[row][col].m_y =col;
		}
	}
	//set Black starting positions
	m_Board[5][4].m_Type = BLACK;
	m_Board[4][5].m_Type = BLACK;
	
	//set White starting positions
	m_Board[4][4].m_Type = WHITE;
	m_Board[5][5].m_Type = BLACK;
}

GameBoard::~GameBoard(){}

int GameBoard::getType(int a_x, int a_y)
{

	return m_Board[a_x][a_y].m_Type;
}
void GameBoard::drawBoard()
{
	for(int row = 1; row<= HEIGHT; ++row)
	{
		for( int col = 1; col <=WIDTH; ++col)
		{
			switch(getType(row, col))
			{
			case EMPTY:		{cout<<'x';
							break;}
								
			case BLACK:		{cout<<'b';
							break;}
										
			case WHITE:		{cout<<'w';
							break;}
								
			}
	
		}
			cout<<endl;
		
	}

}
int GameBoard::getPosition()
{
}
void GameBoard::legalMoves()
{
		for(int row =0 ; row < HEIGHT; ++row)
		{
			for( int col = 0; col < WIDTH; ++col)
			{
				if(m_Board[row][col].m_Type = EMPTY)
				{
					//Check to the right
				for(int col =x + 1; col < WIDTH; ++col)
				{
					
				}

				//Check to the left
				for(int col = x - 1; col >= 0; --col)
				{
				
				}

				//Check top
				for(int row = y - 1; row >= 0 ; --row)
				{

				}


				//Check bottom
				for(int row = y + 1; row < HEIGHT; ++row)
				{

				}



				//Check bottom right
				for(int row = y + 1, col = x + 1; row < HEIGHT && col < WIDTH; ++row, ++col)
				{

				}


				//Check bottom left
				for(int row = y + 1, col = x - 1; row < HEIGHT && col > 0; ++row, --col)
				{

				}


				//Check top right
				for(int row = y - 1, col = x + 1; row > 0 && col < WIDTH; --row, ++col)
				{

				}

				//Check top left
				for(int row = y - 1, col = x - 1; row > 0 && col > 0; --row, --col)
				{

				}


}

